package tw.com.softleader.json.jackson.app;

import java.io.InputStream;

import com.fasterxml.jackson.databind.ObjectMapper;

import tw.com.softleader.json.jackson.entity.Question01Entity;
import tw.com.softleader.json.jackson.entity.Question06Entity;

public class Question06App {

	public static void main(String[] args) {
		
		// read file
		InputStream in = Question06App.class.getResourceAsStream("/question06.json");
		
		Question06Entity q06Entity = null;
		try {
			
			// TODO 請將 q06Entity 載入 question06.json 的資料, 該 json 每個欄位都被刻意改了一個成為大寫
			// 請調整 Question06Entity 增加 @JsonProperty 使其正常
			ObjectMapper objectMapper = new ObjectMapper();		
			
			q06Entity = objectMapper.readValue(in, Question06Entity.class) ;
			
			
		} catch (Exception e) {
			e.printStackTrace();
		} 
		
		System.out.println(q06Entity);
		
	}
	
}
